package sdk

import (
	"demo/kongganghelper/config"
	"demo/kongganghelper/utils"
	"strconv"
	"time"
)

func parametersProcessing(params map[string]string) {
	Config := config.GetConfig()
	//params["_s_q__"] = Config.KongGang.SQ
	params["client"] = "android"
	params["appkey"] = Config.KongGang.AppKey
	params["deviceId"] = "c0e99d1e-5097-3d8a-8dfe-ffae3d74b009"
	params["encrypt"] = Config.KongGang.Encrypt
	params["timestamp"] = strconv.FormatInt(time.Now().UnixNano()/1e6, 10)
	params["version"] = Config.KongGang.Version
	params["signcode"] = utils.AppendSignCode(Config.KongGang.SignKey, params)
}

func urlProcessing(url string) string {
	Config := config.GetConfig()
	baseUrl := Config.KongGang.ApiUrl
	return baseUrl + url
}
